class RemoteIPMixin:
    def _request_summary(self) -> str:
        remote_ip = self.request.remote_ip
        if remote_ip == '0.0.0.0':
            fallback_ip = self.request.headers.get('X-Real-Ip')
            if not fallback_ip:
                fallback_ip = self.reqeust.headers.get('X-Forwarded-For')
            if fallback_ip:
                remote_ip = fallback_ip
        return "%s %s (%s)" % (
            self.request.method,
            self.request.uri,
            remote_ip,
        )
